﻿Public Class OfficerStatusItem

	Private mstatus_id As String
	<SS.ORM.Attributes.DatabaseField("STATUS_ID")> _
	Public Property status_id As String
		Get
			Return mstatus_id
		End Get
		Set(ByVal value As String)
			mstatus_id = value
		End Set
	End Property

	Private mstatus_desc As String
	<SS.ORM.Attributes.DatabaseField("STATUS_DESC")> _
	Public Property status_desc As String
		Get
			Return mstatus_desc
		End Get
		Set(ByVal value As String)
			mstatus_desc = value
		End Set
	End Property

	Public Property Status As Common.EnumType.OfficerStatus
		Get
			Try
				Return DirectCast([Enum].Parse(GetType(Common.EnumType.OfficerStatus), mstatus_id), Common.EnumType.OfficerStatus)
			Catch
				Throw New Exception("ไม่สามารถกำหนดค่าให้กับ Officer Status ได้ อาจเกิดจากค่าจากฐานข้อมูลไม่สัมพันธ์กับชนิดของ Enum")
			End Try
		End Get
		Set(ByVal value As Common.EnumType.OfficerStatus)
			mstatus_id = value
		End Set
	End Property

End Class
